package ar.edu.itba.it.paw.services;

import java.util.List;
import java.util.Map;

import ar.edu.itba.it.paw.domain.Category;
import ar.edu.itba.it.paw.domain.OrderProducts;
import ar.edu.itba.it.paw.domain.Product;
import ar.edu.itba.it.paw.domain.Transaction;
import ar.edu.itba.it.paw.domain.User;
import ar.edu.itba.it.paw.domain.exceptions.InsufficientProductsException;
import ar.edu.itba.it.paw.domain.exceptions.InvalidOperationException;

public interface ProductServices {

	public List<Product> getAllProducts(OrderProducts order);
	
	public List<Product> getAllProducts();
	
	public Product getProduct(int product_id);
	
	public List<Product> getVisitedProducts();
	
	public List<Product> getUserProducts(User user);
	
	public List<Product> getOtherUserProducts(User user);
	
	public List<Product> getProductsByCategory(Category category);
	
	public void buy(Transaction transaction) throws InsufficientProductsException, InvalidOperationException;
	
	public List<Transaction> getTransactionByCategory(Category category);
	
	public Map<Category,Integer> countTransactionsByCategory();
	
	public void addProduct(Product product);
	
	public void editProduct(Product product);
	
	/*Aumenta en uno el contador de visitas del producto*/
	public void visitProduct(Product product);
	
	public List<Category> getCategories();
	
	public Category getCategory(String category);
	
	public Category getCategory(int category_id);

}
